import request, { download } from '@/utils/request'

// 下载
/**
 * 
 * @param {*} data //入参
 * @param {*} filename //下载文件名称以及文件后缀为文件类型
 * @returns 
 */
export function downloads (data, filename) {
  return download(
    '/business/factory/device/data/export',
    data,
    filename
  )
}
// 进水指标列表
export function getfactoryList (query) {
  return request({
    url: '/business/factory/device/data/list',
    method: 'get',
    params: query
  })
}
// 湖面设备状态列表
export function getlakeDevicestatusList (query) {
  return request({
    url: '/business/lakeDevice/status/list',
    method: 'get',
    params: query
  })
}
// 获取电箱及其关联的设备
export function getlakeDevicestatusChildren (id) {
  return request({
    url: '/business/lakeDevice/status/getDevicelist/' + id,
    method: 'get'
  })
}
// 设备电量列表
export function getpowerStatsList (query) {
  return request({
    url: '/business/powerStats/list',
    method: 'get',
    params: query
  })
}
// 湖面状态导出数据
export function downloadlakeDevice (data, filename) {
  return download(
    '/business/lakeDevice/status/export',
    data,
    filename
  )
}
// 导出设备电量信息Excel
export function downloadpowerStats (data, filename) {
  return download(
    '/business/powerStats/export',
    data,
    filename
  )
}
// 导出湖面设备工作时长Excel
export function downloadruningHour (data, filename) {
  return download(
    '/business/lakeDevice/runingHour/export',
    data,
    filename
  )
}

// 湖面设备工作时长列表
export function getruningHourList (query) {
  return request({
    url: '/business/lakeDevice/runingHour/list',
    method: 'get',
    params: query
  })
}
// 查询DO监测仪管理列表
export function getmonitordevicerList (query) {
  return request({
    url: '/business/monitor/device/list',
    method: 'get',
    params: query
  })
}
// 查询DO监测仪数据列表
export function getmonitordevicerdataList (query) {
  return request({
    url: '/business/monitor/device/data/list',
    method: 'get',
    params: query
  })
}
// 导出
export function downloaddevicedata (data, filename) {
  return download(
    '/business/monitor/device/data/export',
    data,
    filename
  )
}